Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to interpret*period dummies in fixed-effect models?

    Hello Stata-Experts,

    Lets suppose I want to investigate the connection of M&As and firms profits under control of the size in terms of employees. To observe potential effects, I ran a panel-data regression with fixed effects in Stata. Please find the code below.

    xtreg profit post#i.treat i.treat employees i.year, fe

    Variable 'post' is a dummy variable taking =1 for years after the merger bur only for firms of the treatment group, 'treat' is a dummy variable for firms that are involved in a merger, independently from the year (treatment group). Mergers happened in different years. 'i.-year' is a period-dummy for the 5 years. My (maybe straightforward) question is, which is the variable of interest in terms of the given research question? I would suppose it is the interaction of 1.post*1.treat, but I am not sure. Additionally, I am wondering if the years that occurs in the regression output due the 'i.year' needs to be interpreted or if they can be ignored.

    I would appreciate any kind of help!

    Thanks in advance

    KR

  • #2
    Variable 'post' is a dummy variable taking =1 for years after the merger bur only for firms of the treatment group
    This description is ambiguous. What value does it take for firms outside the treatment group, and what value does it take for firms in the treatment group in the years prior to merger? If the answer to either of those is missing value, then what you have is a defective data set that will give you wrong answers to any question you pose to it.

    If the answer is 0, then the variable you call post is already, by itself, a treatment#time interaction variable. Further interacting it with treat makes no sense at all. So I would not spend a lot of time trying to interpret this model; it's just invalid.

    If your variable post is already an interaction between treatment and time, then the model you should be running is more like:
    Code:
    xtreg profit i.post employees i.year, fe
    The coefficient of post will then be your generalized difference in differences estimator of treatment effect.
    Last edited by Clyde Schechter; 21 Sep 2022, 14:21.

    Comment


    • #3
      Dear Mr. Schechter,

      First of all, thanks a lot for your reply!

      Variable post is 0 for the treatment group before the merger and always 0 for the control group. I understand your point, i.post*i.treat is nonsense.
      My problem is, that I have different years a firm is involved in a merger (e.g. Firm A in 2004, Firm B in 2007 and Firm C never), so it is not possible to define pre and post periods for all firms in both groups.

      If your variable post is already an interaction between treatment and time, then the model you should be running is more like:
      So, I suppose the variable post is not an interaction in your sense. If I may ask you another question, what would be your approach?

      Thanks in advance.

      KR
      Last edited by Phil Smith; 21 Sep 2022, 14:40.

      Comment


      • #4
        Yes, the variable post, being 1 in the treatment group following their mergers, and 0 for all other observations, is precisely the kind of treatment#time interaction you need in your model. It is not the classical DID model where every entity who is treated begins it at the same time. But it is still a viable model, known as generalized DID, and the variable you have called post (I would have given it a more descriptive name such as "merged" or "treated") is very much the crux of it. To use this model, you must include both time effects (i. year) and entity (firms or whatever they are) effects. Hence the model I proposed in #2. To learn more about generalized DID, you might want to look at https://www.annualreviews.org/doi/pd...-040617-013507. It's not in your field, but it doesn't require any technical knowledge of public health and is, I think, eminently readable by anybody with basic statistical knowledge.

        Comment


        • #5
          Thank you so much for the recommendation, the paper helped me a lot, not at least because it contains other studies with practical examples (e.g. for event study method).

          Back to the origin question. I hope this time I got it right. If so, this should be an appropriate model to estimate the effect of a merger:

          Code:
          xtreg profit i.merged size i.year i.entity i.municipal, fe
          If I got you right, the interaction term is not needed, because i.merged (before called i.post) includes the same information. Besides the year dummies, I included both, entity effects and municipality effects. Regarding the municipality effects, I am wondering if it is good or even allowed to include them. Allowed in terms of the FE-term, e.g. because the municipality of an entity doesn't change over time or because it is already included in the FE-Term.

          In terms of a mathematical expression it should look like this:

          Click image for larger version

Name:	Bildschirmfoto 2022-09-22 um 12.19.20.png
Views:	1
Size:	10.2 KB
ID:	1682921


          Where X includes some control variates, e.g. size.

          I would appreciate a little feedback on this.

          Thanks in advance for your help!
          Last edited by Phil Smith; 22 Sep 2022, 04:19.

          Comment


          • #6
            In addition to #5: Would it be more appropriate to perform an event study by including leads and lags in the model? In the literature, this is stated as possibility to explore the dynamic and would also be helpful to evaluate the parallel trend assumption. In my understanding, there's no other way to observe for it, since the treatment year is variant over time
            Last edited by Phil Smith; 22 Sep 2022, 05:15.

            Comment


            • #7
              If municipality is constant over time within entity, then inclusion of municipality is not possible. You can include it in your command, but Stata will remove it due to colinearity with the fixed effects. Similarly, if you are -xtset-ing your data with entity as the panel variable, then explicitly using i.entity in the model accomplishes nothing, because -fe- includes it automatically and it can only appear once. If you have used some other variable as the panel variable in your -xtset- command, then that might be a different story.

              The variable merged is, in substance, an interaction, so no other explicit interaction term is needed in the model.

              Event study methodology is not used in my field, epidemiology, and all I know about it is what I have gleaned reading posts here on Statalist. I don't want to advise you about it considering my limited knowledge there. I will say that in difference-in-differences analyses, one often includes lagged values of explanatory variables because, in the real world, some things have delayed impact. Including leads is, I think more problematic. The whole point of difference-in-difference analyses is to try to estimate a causal effect. Causes must always precede effects in time, so the use of leads would not be appropriate, unless, perhaps, the lead value of some variable Z is understood to be an observable proxy for the current value of some latent variable W. Even there, I think this is stretching things a bit.

              Comment


              • #8
                Thanks Mr. Schechter for all your help, not only on this question! The fact that Stata removes both variables, municipality and entity, but somehow includes it automatically to the fe is confusing. Do I have to add both variables name into the command or specify that somehow? Otherwise, if they are not part of the command, how does Stata know it has to include them?

                Comment


                • #9
                  In order to use -xtreg-, you must first have issued an -xtset- command. (Or perhaps somebody who created the dataset for you did that and you are unaware of it? If this is the case run -xtset- and Stata will show you what the xt settings are for this data set.) The -xtset- command requires specification of a panel variable (and allows, but does not require, specification of a time variable as well.) Whatever that panel variable was, it is automatically included in any subsequent -xtreg, fe-. It is the -xtset- command that enables Stata to know it has to include it. It is not shown explicitly in the output, but it has been accounted for in the regression analysis. Any explicit mention of the same variable simply results in its being omitted.

                  If the entity was the panel variable, and if some other variable, such as municipality, is constant within the panel variable (as you say is true of your case), then it is mathematically impossible to estimate the effects of municipality. This is not some peculiarity of Stata or the -xtreg, fe- command: you will encounter this with any statistical package that does fixed-effects regression, or, for that matter, were you to try to do the regression by hand. It is linear algebra and there is no getting around it. If you speicfy i.municipality in your -xtreg, fe- command, Stata will recognize this situation and will omit it. That said, you should be aware that fixed effects regressions have the mathematical property that effects of time-invariant variables (like municipality), although they cannot be estimated, automatically adjust for those effects. This is one of the reasons that economists love fixed-effects models so much: you do not have to think about omitted variable bias from time-invariant variables--those effects are automatically washed out in the fixed-effects regression calculations.

                  Now, if the panel variable in the -xtset- command was municipality, the situation is different. You will, at least in general, I assume, have more than one entity in each municipality. So you can include i.entity in the regression and it will not be omitted. (If you do have any municipality with only one entity, that municipaliity will not contribute to the estimation of the entity effect.)

                  Comment


                  • #10
                    I set -xtset- on entity and year. Did not know Stata will automatically do include the invariant variables. Thanks for clarification! For the mathematical equation, how do one show which fe are included? In the equation in #5 I just added year, entity and municipality. But as you just stated, it would be mathematically impossible to estimate them, is it still correct?

                    Comment


                    • #11
                      So here's how I would write the model equation:

                      Code:
                      yet = b0 + b1*postmergeet + b2*yeart + b3*Xet + ue + epsilonet
                      Several of these terms are the same as you showed in your equation. I have removed the explicit term for entity: that is now reflect by ue which is the entity-level fixed effect recognized in the -xtset- command in the fixed-effects model. (The letter u is commonly used for this purpose.) Notice that the subscripting on X no longer references municipality: municipalities simply cannot exist in this model. It may be that the covariate X varies only at the municipality level, not at the entity level, but as long as it varies over time, it will remain in the model. If any of the X's vary only at the municipality level and are time-invariant, Stata will omit them because their effects cannot be estimated. Notice that the subscripting of epsilon also excludes mention of the municipality.

                      I did not say that it is impossible to estimate year effects. It is possible, and you can definitely include i.year in the model if you want to include year effects. And to be extra clear, when you -xtset panelvar timevar-, Stata automatically includes fixed effects for panelvar in the xt-regression models. But it does not automatically incorporate time effects. You can include time effects explicitly if you want them. If you don't mention the time variable explicitly in the xt-regression command, then time is not included.

                      Comment


                      • #12
                        Dear Mr. Schechter, thank you so much! It was a long way till this point, but these and others of your explanations helped me a lot!

                        Comment

                        Working...
                        X